package com.fr.chart.base.equals;

import com.fr.chart.shape3d.Cylinder;
import java.awt.Shape;
import java.awt.geom.Arc2D;
import java.awt.geom.GeneralPath;
import java.awt.geom.Rectangle2D;

public class Equals
{
  public static boolean equals(Object paramObject1, Object paramObject2)
  {
    if (paramObject1 != null)
    {
      if (paramObject2 == null)
        return false;
      if (!(paramObject1.getClass().getName().equals(paramObject2.getClass().getName())))
        return false;
      if (paramObject1.equals(paramObject2))
        break label48;
      return false;
    }
    label48: return (paramObject2 == null);
  }

  public static boolean euqalsShape(Shape paramShape1, Shape paramShape2)
  {
    if (paramShape1 != null)
    {
      Object localObject1;
      Object localObject2;
      if (paramShape2 == null)
        return false;
      if (!(paramShape1.getClass().getName().equals(paramShape2.getClass().getName())))
        return false;
      if ((paramShape1 instanceof Arc2D) && (paramShape2 instanceof Arc2D))
      {
        localObject1 = (Arc2D)paramShape1;
        localObject2 = (Arc2D)paramShape2;
        if ((((Arc2D)localObject1).getAngleExtent() != ((Arc2D)localObject2).getAngleExtent()) || (((Arc2D)localObject1).getAngleStart() != ((Arc2D)localObject2).getAngleStart()) || (((Arc2D)localObject1).getArcType() != ((Arc2D)localObject2).getArcType()) || (((Arc2D)localObject1).getX() != ((Arc2D)localObject2).getX()) || (((Arc2D)localObject1).getY() != ((Arc2D)localObject2).getY()) || (((Arc2D)localObject1).getWidth() != ((Arc2D)localObject2).getWidth()) || (((Arc2D)localObject1).getHeight() != ((Arc2D)localObject2).getHeight()))
          return false;
      }
      if ((paramShape1 instanceof Rectangle2D) && (paramShape2 instanceof Rectangle2D))
      {
        localObject1 = (Rectangle2D)paramShape1;
        localObject2 = (Rectangle2D)paramShape2;
        if ((((Rectangle2D)localObject1).getX() != ((Rectangle2D)localObject2).getX()) || (((Rectangle2D)localObject1).getY() != ((Rectangle2D)localObject2).getY()) || (((Rectangle2D)localObject1).getWidth() != ((Rectangle2D)localObject2).getWidth()) || (((Rectangle2D)localObject1).getHeight() != ((Rectangle2D)localObject2).getHeight()))
          return false;
      }
      if ((paramShape1 instanceof Cylinder) && (paramShape2 instanceof Cylinder))
      {
        localObject1 = (Cylinder)paramShape1;
        localObject2 = (Cylinder)paramShape2;
        return ((Cylinder)localObject1).equals(localObject2);
      }
      if ((paramShape1 instanceof GeneralPath) && (paramShape2 instanceof GeneralPath))
      {
        localObject1 = (GeneralPath)paramShape1;
        localObject2 = (GeneralPath)paramShape2;
        if (((GeneralPath)localObject1).getWindingRule() != ((GeneralPath)localObject2).getWindingRule())
          return false;
      }
    }
    return (paramShape2 == null);
  }
}